#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>

using namespace std;

int main()
{
    int m, n;
    int x, y;
    cin >> n >> m;
    int arr[10][10] = { {0} };
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= m; j++)
        {
            cin >> arr[i][j];
        }
    }
    cin >> x >> y;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= m; j++)
        {
            if (x == i && y == j)
            {
                cout << arr[x][y] << endl;
            }
        }
    }
    return 0;
}